<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2016/6/8
  Time: 9:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="/wechat/order/complains.css">
    <jsp:include page="../public/head.jsp" flush="true" />
</head>
<body>
<jsp:include page="../public/header.jsp" flush="true" />
<section>
    <div class="my_complains">
        <form id="form" onsubmit="return false">
            <div class="tit"><span>亲爱的小主，使用早范服务，有什么意见，请 赐教，伦家会在24小时内进行认真回复，还会 给优质反馈的用户提示小礼物哦~</span></div>
            <div class="txt">
                <input type="textarea" name="content" id="content" class="txt1"  placeholder="请输入您的投诉内容提">
                <input type="hidden" name="orderId"   value="${orderId}">
                <div class="txt2" id="tip">0/100字</div>
            </div>
            <input type="button"  class="btnComplain" value="发送" onclick="complaints()">
        </form>
    </div>
    <!--/my_complains -->
</section>
<footer><div  class="my_ocupie"></div></footer>
<script>
    function textCount(){
        var text  =    $("#content").val();
        var counter  =    text.length;

        $("#tip").text((100-counter)+"/100字");
    };

    function complaints() {
        if ($("#content").val() == 0){
            tip("","请输入反馈内容",true);
            return;
        }

        $.post("/mobile/user/order?action=complaints",$("#form").serialize(),function (data) {
            if (!data.success){
                tip("",data.msg,true);
            }else {
                window.location.href = "/order/orderList.do";
            }
        },"json");
    }
</script>
</body>
</html>
